You are on page 1of 1

Set the session Using Jquery

Sessions are playing vital role in the web development. Most of the time we need to set
the session during development.

For example when the user get the successful login we set the session Id or Cookie to
track the user for the full of successful session.

If we develop the code using Jquery we can create the session using Jqury session plugin.

For that plugin you can download it from the following link

http://code.google.com/p/jquery-session/downloads/list

I used the version 0.3 in this example

In this version there is also a JQuery, Json .Jquery.session is available.You can use it
depend upon your meeds.

The following PHP program set the session using Jquery

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Seesion Using Jquery</title>
<script type="text/javascript" src="jquery/jquery.js"></script>
<script type="text/javascript" src="jquery/jquery.session.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$.session("example","mysession");
alert($.session("example"));
});
</script>
</head>

<body>
<!--Please Visit http://technotiger87.blogspot.com and leave the comments-->
</body>
</html>

Use this and leave the comments

Plese visit http://technotiger.blogspot.com

You might also like